<?php

class MY_Controller extends CI_Controller{
    
    function __construct() {
        parent::__construct();
        session_start();
        if(!isset($_SESSION['userData']->id)){
            redirect(base_url().'welcome');
        }
    }
    
    function show_view($view= '', $hdata='', $data= ''){
        $this->load->view('header', $hdata);
        $this->load->view($view, $data);
        $this->load->view('footer');
    }
    
}